﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutRecepcionista.cshtml";
}
@model IEnumerable<Cliente_DozenContext.Cliente_Clase>
@{ 
    GridEditMode mode = (GridEditMode)ViewData["mode"];
    GridButtonType type = (GridButtonType)ViewData["type"];  
            @(Html.Telerik().Grid(Model)
                    .Name("GridCliente")
                                    .ToolBar(commands => commands.Insert().ButtonType(type).ImageHtmlAttributes(new { style = "margin-left:0" }))

                    .Columns(columns =>
                    {
                        columns.Bound(o => o.Cliente_Cliente.Cliente_ClienteNombre).Width(120);
            columns.Bound(o => o.Cliente_ClaseFecha).Width(100);
            columns.Bound(o => o.Cliente_Curso.Cliente_CursoNombre);
                    })
                    .DataBinding(dataBinding => dataBinding.Server()
                            .Select("Index", "GridAccesoCliente", new { mode = mode, type = type })
                            .Insert("Insert", "GridAccesoCliente", new { mode = mode, type = type }))
                 

                    .DataKeys(keys => keys.Add(m => m.Cliente_ClienteCod))
                    .Scrollable(scrolling => scrolling.Enabled(true))
                    .Pageable(paging => paging.Enabled(true))
                    .Editable(editing => editing.Mode(mode))
                    
                    .Footer(true)
                            .Filterable()


            ) 

    }
